﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Web Camera</title>
	<link rel="stylesheet" href="jquery/css/jquery.ui.all.css" />
	<link rel="stylesheet" href="css/common.css" />
	<script src="jquery/jquery-1.9.1.min.js"></script>
	<script src="jquery/jquery.ui.core.js"></script>
	<script src="jquery/jquery.ui.widget.js"></script>
	<script src="jquery/jquery.ui.mouse.js"></script>
	<script src="jquery/jquery.ui.slider.js"></script>
	<script src="jquery/json2.js"></script>
	<script src="js/network.js"></script>
	<script src="js/common.js"></script>
</head>
<script  type="text/javascript"> 
//语言包初始化
document.write(GetLanguagePathStr());
</script>
<style type="text/css">
.BasicInforDiv{
	background:#1c1d22;
	left:0px;
	right:0px;
	height:240px;
}

.DivLable{
	text-align:left;
	line-height: 23px;
	font-family:arial;
	font-style:regular;
	font-size:16px;
	color:#ffffff;
	height:23px;
	cursor: pointer;
}
.DivInputAtLoacalRecord{
	width:280px;
	float:left;
}

#id_txtLocalrecordpath{
	width:160px;
	float:left;
}

.txtDeviceModel{
	width:160px;
	float:left;
}

</style> 


<body>   
<div class="BasicInforDiv" style="min-width:600px;">
	<div style="width:100px;height:30px;"></div>
	<div style="height:100%;margin:auto;width:600px;">	
		<div class="DivLable txtDeviceModel" id="id_txtDeviceModel">Device Model:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="id_DeviceModel" value="IPCAM" readonly="readonly"></input>
		<div style="clear:both;height:15px;"></div>
		
		<div class="DivLable txtDeviceModel" id="id_txtAddress">Address:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="id_PTZAddress" value="admin" readonly="readonly"></input>
		<div class="DivLable" style="float:left;margin-left:10px;">(0-255)</div>
		<div style="clear:both;height:15px;"></div>
		
		<div class="DivLable txtDeviceModel" id="id_txtUPNPEnable">UPNP:</div>
		<div style="float:left"> 
		<div class="ClassContentSelect" id="id_UPNP">Disable</div>
		<div class="DivContentSelectIco" id="id_UPNP_selectico"></div>
		<div style="clear:both"></div>
		<div class="ClassContentSelectOption" name="id_UPNP_option" style="margin-top:0px;" id="id_txtDisable">Disable</div>
		<div class="ClassContentSelectOption" name="id_UPNP_option" style="margin-top:24px;" id="id_txtEnable">Enable</div>
		</div>
		<div style="clear:both;height:15px;"></div>
	<!--	
		<div class="DivLable txtDeviceModel" id="id_txtOCXVersion">OCX Version:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="id_OCXVersion" value="admin"></input>
		<div style="clear:both;height:15px;"></div>
	-->
		<div class="DivLable txtDeviceModel" id="id_txtIPCVersion">IPC Version:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="id_IPCVersion" value="admin" readonly="readonly"></input>
		<div style="clear:both;height:15px;"></div>
		
		<!--
		<div class="DivLable txtDeviceModel" id="id_txtIEVersion">IE Version:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="id_IEVersion" value="admin"></input>
		<div style="clear:both;height:15px;"></div>
		
		<div class="DivLable txtDeviceModel" id="id_txtImageVersion">Image Version:</div>
		<input class="DivInput DivInputAtLoacalRecord" id="idImageVersion" value="admin"></input>
		<div style="clear:both;height:15px;"></div>
	-->
		<div class="DivButton" style="float:left;margin-left:300px;" id="id_submit">Save</div>
		<div style="clear:both"></div>
	</div>
</div>
</body> 
<script  type="text/javascript"> 
//���԰���ʼ��
function InitLang(){


	SetLang('id_txtDeviceModel',str_BasicDeviceModel);
	SetLang('id_txtAddress',str_BasicPanAddr);
	SetLang('id_txtUPNPEnable',str_BasicIsUPNP);
	SetLang('id_txtDisable',str_NetDHCPDisable);
	SetLang('id_txtEnable',str_NetDHCPEnable);
	//SetLang('id_txtOCXVersion',str_OCXVersion);	
	SetLang('id_txtIPCVersion',str_IPcameVersion);
	//SetLang('id_txtIEVersion',str_IEVersion);
	//SetLang('id_txtImageVersion',str_ImageLibVision);
	SetLang('id_submit',str_btnBasicSave);
};
</script> 

 <script  type="text/javascript"> 
 
function InitPageParam()
{
	var resp = $.sendMsg("DeviceInfo",null,"/ISAPI/DeviceInfo","POST");
	if(resp.success == false){
		alert("recv DeviceInfo msg fail");
		return;
	}
	var map = resp.data;
	
	//var map = {"devicename":"IPCAM","deviceid":"1701060000","devicemodel":null,"upnp":"0","softwarever":"0a-00-00-03-GW","factoryinfo":"IPCAM"};
	console.log(JSON.stringify(map));

	SetSelectionOptID('id_UPNP',map.upnp);
	$("#id_PTZAddress")[0].value = 1;
	$("#id_IPCVersion")[0].value = map.softwarever;
}
 
function submit()
{
	var msg = [
				{"xtype":"upnp","text":"" +GetOptionByVlaue('id_UPNP',GetSelectionVal('id_UPNP'))}
			];
	var resp = $.sendMsg("DeviceInfo",msg,"/ISAPI/DeviceInfo","PUT");
	//console.log(JSON.stringify(msg));
	if(resp.success == false){
		alert("submit submit msg fail");
	}	
}
 
 $(function (){
		InitLang();
		InitUdfSelect('id_UPNP');
		InitPageParam();
		BindEvent('id_submit','onmousedown',submit,null);
	}
 );
	
</script>
</html>  
